﻿using System;

namespace PropertyChangedEvent
{
    public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs args);

    public class PropertyChangedEventArgs : EventArgs
    {
        private string propertyName;
        private object oldValue;
        private object newValue;

        public PropertyChangedEventArgs(string propertyName, object oldValue, object newValue)
        {
            this.PropertyName = propertyName;
            this.OldValue = oldValue;
            this.NewValue = newValue;
        }

        public string PropertyName
        {
            get
            {
                return propertyName;
            }
            set
            {
                propertyName = value;
            }
        }

        public object OldValue
        {
            get
            {
                return oldValue;
            }
            set
            {
                oldValue = value;
            }
        }

        public object NewValue
        {
            get
            {
                return newValue;
            }
            set
            {
                newValue = value;
            }
        }
    }
}
